<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<html>
<body>
<jsp:include page="_headCharge.jsp"></jsp:include>
<form class="form-inline" action="" method="post">
从<div class="datepicker input-append">
    <input data-format="yyyy-MM-dd" type="text" value="${beginDate}" name="beginDate"></input>
    <span class="add-on">
      <i data-time-icon="icon-time" data-date-icon="icon-calendar">
      </i>
    </span>
  </div>
到
  <div class="datepicker input-append">
    <input data-format="yyyy-MM-dd" type="text" value="${endDate}" name="endDate"></input>
    <span class="add-on">
      <i data-time-icon="icon-time" data-date-icon="icon-calendar">
      </i>
    </span>
  </div>
  <button type="submit" class="btn">查询</button>
</form>

<span>累计充值统计</span><br/>
<table class="table table-bordered">
  <thead>
    <tr> 	 	 			 	
      <th>充值金额(￥)</th>
      <th>充值人数</th>
      <th>充值总金额(￥)</th>
    </tr>
  </thead>
  <tbody>
  <c:set var="allPeople" value="0"/>
  <c:set var="allGold" value="0"/>
  <c:forEach var="n" items="${all.leijiChargeList}">
    <tr>
      <td>${n.keyStr}</td><!-- K币/100 = RMB -->
      <td>${n.people}</td>
       <c:set var="allPeople" value="${allPeople + n.people }"/>
      <td>${n.gold}</td>
      <c:set var="allGold" value="${allGold + n.gold }"/>
    </tr>
  </c:forEach>
  <tr>
  <td>合计</td>
  <td><c:out value="${ allPeople}"/></td>
  <td><c:out value="${ allGold}"/></td>
  </tr>
  </tbody>
</table>

<span>充值次数统计</span>
<table class="table table-bordered">
  <thead>
    <tr> 	 	 			 	
      <th>项目</th>
      <th>充值人数</th>
      <th>充值金额(￥)</th>
    </tr>
  </thead>
  <tbody>
  <c:set var="allPeople1" value="0"/>
  <c:set var="allGold1" value="0"/>
  <c:forEach var="m" items="${all.timesCountList}" varStatus = "vs">
   <%--<c:if test="${vs.count == 1}">
    <c:set var="allPeople1" value="${allPeople1 + m.people}"/>
    <c:set var="allGold1" value="${allGold1 + m.gold}"/>
    
    </c:if> --%>
  <c:if test="${vs.count > 0}">	
    <tr>
    <td>${m.keyStr }</td>
    <td>${m.people }</td>
    <td>${m.gold }</td>
    </tr>
    <c:set var="allPeople1" value="${allPeople1 + m.people }"/>
    <c:set var="allGold1" value="${allGold1 + m.gold }"/>
    </c:if>
   
  </c:forEach>
  <tr>
  <td>总付费</td>
  <td><c:out value="${ allPeople1}"/></td>
  <td><c:out value="${ allGold1}"/></td>
  </tr>
  </tbody>
</table><br/>
</body>
</html>